﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MayCar.Models;

namespace MayCar.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            using (dbEsCms db = new dbEsCms())
            {
                tb_user user = new tb_user();
                user.UserId = Guid.NewGuid().ToString();
                user.UserName = DateTime.Now.ToString();
                user.Password = DateTime.Now.ToString();
                db.tb_user.Add(user);
                db.SaveChanges();
            }
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}